<?php
/**
 * Created by PhpStorm.
 * User: 顾永海
 * Date: 2016/10/22
 * Time: 12:35
 */

namespace Admin\Controller;


class OrderController extends CommonController
{

    /**
     * 订单列表
     * */
    public function index()
    {
        $map = array();
        if (I('get.courses_id') != '') {
            $map['courses_id'] = I('get.courses_id');
        }
        $courses = D('courses')->select();
        $this->assign('courses', $courses);
        $map['status'] =2;
        $list = D('Order')->getList($map);
        $this->assign('count', $list['count']);
        $this->assign('totalPages', $list['totalPages']);// 总分页数
        $this->assign('nowPage', $list['nowPage']);// 当前页
        $this->assign('list', $list['list']);
        $this->assign('page',$list['show']);
        $this->display();
    }
}